package ch.sv7.tool.dbmanager.db.difference;

import ch.sv7.tool.dbmanager.db.ColumnSchema;
import ch.sv7.tool.dbmanager.db.ColumnType;

public class ColumnJDBCTypeDifference extends AbstractColumnDifference {

	private ColumnType expectedType;

	private ColumnType actualType;

	public ColumnJDBCTypeDifference(ColumnSchema expectedColumnSchema, ColumnSchema actualColumnSchema, ColumnType expectedType, ColumnType actualType) {
		super(expectedColumnSchema, actualColumnSchema);
		this.expectedType = expectedType;
		this.actualType = actualType;
	}

	public String getMessage() {
		return super.getMessage() + " has wrong JDBC type - Expected : "
				+ expectedType.getJDBCTypeName() + " Actual : " + actualType.getJDBCTypeName();
	}

	/**
	 * @return the expectedType
	 */
	public ColumnType getExpectedType() {
		return expectedType;
	}

	/**
	 * @return the actualType
	 */
	public ColumnType getActualType() {
		return actualType;
	}
	
	public boolean isBlocker() {
		return true;
	}	
}
